<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
  <title>礼物墙玩法规则</title>
  <link rel="stylesheet" href="/mobile/css/index.css" />
  <script src="/mobile/js/vue.js"></script>
  <script src="/mobile/js/axios.min.js"></script>
  <script src="/mobile/js/vant.min.js"></script>
  <script src="/mobile/js/crypto-js.js"></script>
  <script src="/mobile/js/aes.js"></script>
  <script src="/mobile/js/common.js"></script>
  <style>
  * {
    margin: 0;
    padding: 0;
    -webkit-user-select: none;
    /* Safari */
    -moz-user-select: none;
    /* Firefox */
    -ms-user-select: none;
    /* IE10+/Edge */
    user-select: none;
    /* Standard syntax */
    list-style: none;
  }
  #app {
    background: #0B0829;
    min-height: 100vh;
    box-sizing: border-box;
    color: #fff;
    padding: 20px 16px;
    overflow-y: auto;
  }
  .title {
    font-size: 14px;
    font-weight: bold;
    color: #fff;
    margin-bottom: 10px;
  }
  .title:before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: linear-gradient( 270deg, #B184F1 0%, #F5DEFD 100%);
    vertical-align: middle;
    margin-right: 6px;
  }
  .content {
    font-size: 12px;
    color: rgba(255, 255, 255, .6);
    line-height: 1.5;
    margin-bottom: 16px;
  }
  .van-col {
    height: 46px;
    line-height: 46px;
    font-size: 14px;
  }
  .van-col:not(:last-child) {
    border-right: 1px solid #4C3B7F;
  }
  .level-box {
    margin: 10px 0;
    text-align: center;
    border: 1px solid #4C3B7F;
    border-radius: 10px;
    background: #281D50;
    font-size: 12px;
    overflow: hidden;
  }
  .level-body:not(:last-child) {
    border-bottom: 1px solid #4C3B7F;
  }
  .table-header {
    font-size: 14px;
    font-weight: bold;
    background: #30245D;
  }
  .table-header .van-col {
    height: 56px;
    line-height: 56px;
    color: #fff;
  }
  .thumb {
    font-size: 0;
  }
  .thumb img {
    vertical-align: middle;
    width: 40px;
    height: 40px;
  }
  .level-name {
    font-weight: bold;
    color: #BBB6FF;
  }
  .level-val {
    font-size: 12px;
  }
  
  </style>
</head>

<body>
  <div id="app">
    <div class="title">什么是礼物藏家？</div>
    <div class="content">礼物藏家是对用户礼物收藏度的一种认证和肯定，当前总共分为{{list.length}}个等级，藏家等级越高，代表用户的礼物收藏丰富度越高。用户在升级时将获得对应等级的称号、勋章和奖励。</div>
    <div class="title">如何升级礼物墙等级？</div>
    <div class="content">当收到其他用户赠送的礼物时即可获得与该礼物贝壳价值相等的礼物值，礼物值与点亮礼物种类数同时满足等级所需时即可升至该等级。</div>
    <div class="level-box">
      <van-row class="table-header">
        <van-col span="6">等级</van-col>
        <van-col span="6">等级图标</van-col>
        <van-col span="6">收集种类</van-col>
        <van-col span="6">经验值</van-col>
      </van-row>
      <van-row class="level-body" v-for="(item, index) in list" :key="index">
        <van-col span="6">{{item.levelName}}</van-col>
        <van-col span="6" class="thumb"><img :src="item.thumb" alt=""></van-col>
        <van-col span="6" class="level-val">{{item.giftTypeNum}}</van-col>
        <van-col span="6" class="level-val">{{item.levelUp}}</van-col>
      </van-row>
    </div>
  </div>
  <script>
  new Vue({
    el: '#app',
    data: {
      token: '',
      list: [],
    },
    created() {
      const parse = (queryStr) => {
        const str = queryStr.replace(/^\?/, '')
        return str.split('&').reduce((pre, key) => {
          const [k, v] = key.split('=')
          pre[decodeURIComponent(k)] = decodeURIComponent(v)
          return pre
        }, {})
      }
      var data = parse(location.search)
      if (data.token) {
        this.token = data.token
        this.getData()
      }
    },
    methods: {
      getData() {
        request.get('/api/business/app/wall/level').then(res => {
          console.log(res)
          this.list = res.data
        })
      },
    }
  })
  </script>
</body>

</html>